package test2;

import java.util.Scanner;

public class ValidateYea {
    public static void main(String[] args) {
        ValidateYea v=new ValidateYea();
        v.isLeapYear();
    }

    public void isLeapYear(){
        Scanner sc=new Scanner(System.in);
        System.out.println("请用户输入一个年份");
        int year=sc.nextInt();
        if (year%4==0&&year%100!=0||year%400==0){
            System.out.println("是闰年");
        }else{
            System.out.println("不是闰年");
        }
    }
}
